export function lookup(obj, keyName) {
    if(!isDot(keyName)) {
        const keys = keyName.split('.');

        return keys.reduce((pre, cur) => {
            return obj[cur];
        }, obj);
    } else {
        return obj[keyName];
    }
};

function isDot(str) {
    return str === '.';
}